package com.yunxi.service.dubboService.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.codingapi.txlcn.tc.annotation.LcnTransaction;
import com.yunxi.code.service.CodeCreateDubboService;
import com.yunxi.service.localService.CodeCreateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.transaction.annotation.Transactional;

//@Service(version = "${demo.service.version}",
//        application = "${dubbo.application.id}",
//        protocol = "${dubbo.protocol.id}",
//        registry = "${dubbo.registry.id}"
//)
public class CodeCreateDubboServiceImpl implements CodeCreateDubboService {

    @Autowired
    @Qualifier(value = "codeCreateServiceImpl")
    CodeCreateService codeCreateServiceImpl;

    @Override
    @Transactional
    @LcnTransaction
    public String createCode(String prefix, String infix,Integer serialNumberLength){
        return codeCreateServiceImpl.createCode(prefix, infix, serialNumberLength);
    }
}
